//
//  LPCostomPressentAnimationSimilarityPushAnimation.m
//  ShangHaiHuDongApp
//
//  Created by 刘应平 on 2017/6/16.
//  Copyright © 2017年 刘应平. All rights reserved.
//

#import "LPCostomPressentAnimationSimilarityPushAnimation.h"

@implementation LPCostomPressentAnimationSimilarityPushAnimation
+ (void)enterNextVc{
    CATransition *animation = [CATransition animation];
    [animation setDuration:0.25];
    animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    [animation setType:kCATransitionPush];
    [animation setSubtype:kCATransitionFromRight];
    [[[[UIApplication sharedApplication] keyWindow] layer] addAnimation:animation forKey:nil];
}

+ (void)backLastVc{
    CATransition *animation = [CATransition animation];
    [animation setDuration:0.25];
    animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    [animation setType:kCATransitionPush];
    [animation setSubtype:kCATransitionFromLeft];
    [[[[UIApplication sharedApplication] keyWindow] layer] addAnimation:animation forKey:nil];
}
@end
